﻿namespace EyeOpen.Services.Tests.Controllers
{
	using System.Web.Mvc;
	using EyeOpen.Mvc.Models;
	using EyeOpen.Services.Services;
	using Microsoft.VisualStudio.TestTools.UnitTesting;

	[TestClass]
	public class HomeControllerTest
	{
		[TestMethod]
		public void ExecuteIndexActionOnTheRootExpectedRightContentIsReturned()
		{
			var controller = new FrontEndController(new WebSiteServiceStub());

			var result = controller.Index(ContentLocalizedKnownValues.Language, null) as ViewResult;

			Assert.IsTrue(((WebSiteViewModel)result.Model)
				.ContentLocalizedViewModel
				.Body
				.StartsWith(ContentLocalizedKnownValues.Body));
		}
	}
}